﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NHibernate.Util;

namespace NHibernate.MsSqlCe
{
    public class NHibernateMsSqlCeVirtualDatabaseEnvironment : NHibernateVirtualDatabaseEnvironmentBase<NHibernateMsSqlCeDatabaseInfo>
    {
        protected override void Cleanup(NHibernateMsSqlCeDatabaseInfo databaseInfo)
        {
            if (File.Exists(databaseInfo.DatabasePath))
                File.Delete(databaseInfo.DatabasePath);
        }

        protected override NHibernateDatabaseGeneratorBase<NHibernateMsSqlCeDatabaseInfo> CreateDatabaseGenerator()
        {
            return new NHibernateMsSqlCeDatabaseGenerator();
        }
    }
}
